import * as api from '@/api/my';

export default {
  namespaced: true,
  state: {
    userInfo: {},
  },
  mutations: {
    setUserInfo (state, newValue) {
      state.userInfo = newValue;
    },
  },
  actions: {
    async updateUserInfo (ctx) {
      const res = await api.getUserInfo();
      ctx.commit('setUserInfo', res);
    },
  },
}
